<?php  

import('miho.request.BaseRequest');

/**
* 
*/
class HttpRequest extends BaseRequest
{
  public function __construct(){
    $this->_query = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/';
    $this->_params = $this->_getParams();
    $this->_variables = $_POST;
  }  
  
  private function _getParams(){
    $params = array();
    $queryString = $_SERVER['QUERY_STRING'];
    $pairs = explode('&',$queryString);
    
    foreach ($pairs as $key) {
      $paramsArray = explode('=',$key);
      
      if(sizeof($paramsArray)>1){
        $params[$paramsArray[0]] = $paramsArray[1];
      }else{
        $params[$paramsArray[0]] = true;
      }
      
    }
    
    return $params;
  }
}


?>